import http from '@/api';
import { PORT1 } from '../config/servicePort';

/**
 * @description: 任务管理
 */
export const taskSave = params => http.post(PORT1 + `/task/v1/save`, params);
export const taskUpdate = params => http.post(PORT1 + `/task/v1/update`, params);
export const taskDelete = params => http.get(PORT1 + `/task/v1/delete/${params.id}`);

export const taskCancellation = params => http.get(PORT1 + `/task/v1/cancellation/${params.id}`);
export const taskUpdateStatus = params => http.post(PORT1 + `/task/v1/updateStatus`, params);
export const taskFindPageList = params => http.post(PORT1 + `/task/v1/findPageList`, params);
export const taskFindList = params => http.post(PORT1 + `/task/v1/findList`, params);

/**
 * 任务明细管理
 */

export const taskDetailSave = params => http.post(PORT1 + `/taskDetail/v1/save`, params);

export const taskDetailUpdate = params => http.post(PORT1 + `/taskDetail/v1/update`, params);

export const taskDetailDelete = params => http.get(PORT1 + `/taskDetail/v1/delete/${params.id}/${params.taskId}`);

export const taskDetailFindList = params => http.get(PORT1 + `/taskDetail/v1/findList/${params.taskId}`);
